package bb.lanxing.net.client;

import java.io.IOException;
import java.util.Map;


public interface HttpProxy {
    public static final String MEDIA_JSON = "application/json; charset=utf-8";
    public static final String MEDIA_TYPE_GZIP = "application/x-gzip";
    public static final String MEDIA_TYPE_OCTETE_STREAM = "application/octet-stream";
    public static final String METHOD_GET = "GET";
    public static final String METHOD_POST = "POST";

    void addHeader(String key, String value);

    Response get(String url) throws IOException;

    Response get(String url, Map<String, String> headers) throws IOException;

    Response post(String url, String params) throws IOException;

    Response post(String url, String params, Map<String, String> headers) throws IOException;

    Response upload(String url, String mediaType, Map<String, Object> pairs) throws IOException;

    Response upload(String url, String mediaType, Map<String, Object> pairs, Map<String, String> headers) throws IOException;
}
